package com.upf1sh.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.upf1sh.bean.RebootData;
import com.upf1sh.bean.Thingmodel;
import com.upf1sh.mapper.RebootDataMapper;
import com.upf1sh.service.RebootDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author Lenovo
* @description 针对表【reboot_data】的数据库操作Service实现
* @createDate 2025-01-03 21:37:12
*/
@Service
public class RebootDataServiceImpl extends ServiceImpl<RebootDataMapper, RebootData>
    implements RebootDataService {

    @Autowired
    private RebootDataMapper rebootDataMapper;

    @Override
    public IPage<RebootData> getPage(RebootData rebootData) {
        Page<RebootData> page = new Page<>(rebootData.getPageSize(), rebootData.getPageNum());
        //查询分页结果
        return rebootDataMapper.selectPage(page, null);
    }

    @Override
    public RebootData getRebootData(Integer id) {
        return rebootDataMapper.selectById(id);
    }

    @Override
    public int insertRebootData(RebootData rebootData) {
        return rebootDataMapper.insert(rebootData);
    }

    @Override
    public int updateRebootData(RebootData rebootData) {
        return rebootDataMapper.updateById(rebootData);
    }

    @Override
    public int deleteRebootData(Integer id) {
        return rebootDataMapper.deleteById(id);
    }
}




